package com.chj.comp.common.security.annotation;

import com.chj.comp.common.security.component.PermissionService;
import com.chj.comp.common.security.config.ResouceServerConfig;
import com.chj.comp.common.security.config.TokenConfig;
import org.springframework.context.annotation.Import;

import java.lang.annotation.*;

/**
 * @author cuihui
 * 外部配置以注解方式引入
 * comp security配置注解
 */
@Target({ ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@Import({ ResouceServerConfig.class,  // 认证请求过滤处理
          TokenConfig.class,           // 依赖注入至ResouceServerConfig
          PermissionService.class      // @PreAuthorize("@pms.hasPermission('xx')")权限注解处理类
})
public @interface EnableCompSecurity {
    
}
